import request from '@/utils/sendRequest';

//通过仓库Id，获取仓库信息
export function searchReposApi(params = {}) {
  return request({
    url: `/v1/app/repos/search`,
    method: 'post',
    data: params,
  });
}

//获取所有仓库信息
export function getAllReposApi(params = {}) {
  return request({
    url: '/v1/app/reposList',
    data: params,
    method: 'post',
  });
}

//新增仓库信息
export function addNewReposApi(params = {}) {
  return request({
    url: '/v1/app/repos/add',
    method: 'post',
    data: params,
  });
}

// 删除仓库
export function deleteReposApi(params = {}) {
  return request({
    url: '/v1/app/repos/delete',
    method: 'delete',
    data: params,
  });
}

//获得小组组列表
export function getGroupIdListApi(params = {}) {
  return request({
    url: '/v1/app/team',
    method: 'get',
    data: params,
  });
}
//根据部门id，查询下属小组信息
export function getGroupListByBranchId(params) {
  return request({
    url: `/v1/app/branch/${params}`,
    method: 'get',
  });
}
//获取部门列表
export function getBranchList(params = {}) {
  return request({
    url: '/v1/app/branch',
    method: 'get',
    data: params,
  });
}
